package com.bdqn.util;

import com.bdqn.entity.util.ResultEnum;
import lombok.Data;

@Data
public class BaseException extends RuntimeException{
    private static final long serialVersionUID = 6197112078329713976L;
    //返回枚举信息
    private ResultEnum resultEnum;
    //错误码
    private String errorCode;
    //错误信息
    private String errorMessage;

    public BaseException(){}
    public BaseException(ResultEnum resultEnum){
        this.resultEnum=resultEnum;
        this.errorCode=resultEnum.getCode();
        this.errorMessage=resultEnum.getMsg();
    }
}
